home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Frameworks / Grant's CGI Framework 1.0b14 / Util / globals.h < prev    next >
C/C++ Source or Header  |  1996-04-12  |  3KB  |  121 lines

  1. #pragma once
  2. /*****
  3.  *
  4.  *    globals.h
  5.  *
  6.  *    This is a support file for "Grant's CGI Framework".
  7.  *    Please see the license agreement that accompanies the distribution package
  8.  *    for licensing details.
  9.  *
  10.  *    Copyright ©1995,1996 by Grant Neufeld
  11.  *    grant@acm.com
  12.  *    http://arpp.carleton.ca/grant/
  13.  *
  14.  *****/
  15.  
  16. #include "MyConfiguration.h"
  17.  
  18. #include <Threads.h>
  19.  
  20.  
  21. /***  GLOBAL DECLARATIONS  ***/
  22.  
  23. #ifdef __MainSegment__
  24.     #define    _GLOBAL_    /* local */
  25. #else
  26.     #define    _GLOBAL_    extern
  27. #endif
  28.  
  29. /** QUICKDRAW **/
  30.  
  31. /* Symantec C++ for PPC requires qd to be defined */
  32. #ifndef qd
  33.     #ifdef __SC__
  34.         #ifdef __powerc
  35.         _GLOBAL_    QDGlobals    qd;
  36.         #endif
  37.     #endif
  38. #endif
  39.  
  40.  
  41. /** MEMORY **/
  42.  
  43. /* handle to emergency memory reserve. Used in MemoryFunc.c. IM-Memory 1-46 */
  44. _GLOBAL_    Handle        gEmergencyMemory;
  45.  
  46.  
  47. /** PROCESS **/
  48.  
  49. _GLOBAL_    Boolean        gQuit;            /* application is set to quit */
  50. _GLOBAL_    Boolean        gFrontProcess;    /* application is in the foreground */
  51. _GLOBAL_    long        gSleepTicks;    /* sleep time for WaitNextEvent | threads when app is idle */
  52. //moved to ProcessUtil.c: _GLOBAL_    long    gSleepTicksBusy;/* sleep time for WaitNextEvent | threads when app is processing */
  53. #if kCompileWithProcessFileSpec
  54. _GLOBAL_    FSSpec        gProcessFSSpec;    /* the FSSpec for the application */
  55. #endif
  56.  
  57. /**  THREADS **/
  58.  
  59. _GLOBAL_    Boolean        gThreadQuit;    /* threads should quit now */
  60. //•moved to vThreadMain in"ProcessUtil.c"
  61. //_GLOBAL_    ThreadID    gThreadMain;    /* main application thread id */
  62. _GLOBAL_    short        gThreadTotal;    /* # of threads other than main */
  63.  
  64. /**  IDLE TIME QUIT  **/
  65.  
  66. #if kCompileWithQuitOnLongIdle
  67. _GLOBAL_    long        gTimeLastAction;/* the time in ticks of the last action performed */
  68. _GLOBAL_    Boolean        gDoIdleQuit;    /* whether to quit after period of inactivity */
  69. _GLOBAL_    long        gIdleTimeToQuit;/* idle time needed until quit set */
  70. _GLOBAL_    Boolean        gDoIdleQuitOnOpenApp; /* quit on idle after open app */
  71. #endif
  72.  
  73. /**  APPLE EVENTS  **/
  74.  
  75. _GLOBAL_    AEIdleUPP    gAEIdleUPP;
  76.  
  77.  
  78. /* SCREEN RECTS */
  79.  
  80. #if kCompileWithForeground
  81. _GLOBAL_    Rect        gScreenRect;    /* main monitor */
  82. _GLOBAL_    Rect        gGrayRgnRect;    /* entire screen */
  83. #endif
  84.  
  85.  
  86. /* STRINGS */
  87.  
  88. _GLOBAL_    Str255        gVersionStr;
  89.  
  90.  
  91. /* ERRORS */
  92.  
  93. _GLOBAL_    StringHandle    gSystemErrorStr;
  94.  
  95.  
  96. /* TOOLBOX MANAGERS AND FUNCTION CALLS AVAILABLE */
  97.  
  98. #if kCompileWithDragNDrop && kCompileWithForeground
  99. _GLOBAL_    Boolean        gHasDragNDrop;    /* Drag Manager present */
  100. #endif
  101. #if kCompileWithThreadsOptional
  102. _GLOBAL_    Boolean        gHasThreadMgr;    /* Thread Manager present */
  103. #endif
  104. #if kCompileWithForeground
  105. _GLOBAL_    Boolean        gHasColorQD;    /* Color QuickDraw present */
  106. #endif
  107.  
  108. /* PROFILER (CodeWarrior) */
  109.  
  110. #if __profile__ && __MWERKS__
  111. _GLOBAL_    Boolean        gProfileOn;
  112. #endif
  113.  
  114.  
  115.  
  116. #ifdef _GLOBAL_
  117.     #undef _GLOBAL_
  118. #endif
  119.  
  120. /***** EOF *****/
  121.